// 新增编辑
export const detailConfig = (detail) => {
	return {
		inline: false,
		showBtn: false,
		labelPosition: 'left',
		column: [
			{
				custome: 'HtmlLabel',
				prop: 'policyTitle',
				flag: 'bgTitle',
				labelPosition: 'top',
				display: detail,
				span: 24,
			},
			{
				label: '标题',
				prop: 'policyTitle',
				type: 'input',
				span: 12,
				rules: [{ required: true, message: '请输入标题' }],
			},
			{
				label: '发文字号',
				prop: 'policyArticleCode',
				type: 'input',
				span: 12,
				rules: [{ required: true, message: '请输入发文字号' }],
			},
			{
				label: '发布日期',
				prop: 'publishDate',
				type: 'date',
				format: 'YYYY年MM月DD日',
				valueFormat: 'YYYY-MM-DD',
				span: 12,
			},
			{
				label: '层级',
				prop: 'policyLevel',
				propName: 'policyLevelLabel',
				type: 'remoteSelect',
				code: 'POLICY_LEVEL',
				api: 'getDictItemList',
				filterKey: 'label',
				multiple: false,
				span: 12,
				rules: [{ required: true, message: '请选择层级' }],
			},
			{
				label: '关键词',
				prop: detail ? 'policyKeywords' : 'policyKeyword',
				filterable: true,
				allowCreate: true,
				multiple: true,
				type: 'select',
				placeholder: '请输入关键词',
				span: 24,
			},
			{
				label: '来源单位',
				prop: 'fromName',
				maxlength: '100',
				type: 'input',
				span: 6,
				rules: [{ required: true, message: '请输入来源单位名称' }],
			},
			{
				label: '来源单位区划',
				prop: 'areas',
				propName: 'areasName',
				regionGrade: 3,
				checkStrictly: true,
				type: 'AplidAreaSelect',
				rules: [{ required: true, message: '请选择来源单位区划' }],
				span: 12,
			},
			{
				label: '来源层级',
				prop: 'fromLevel',
				propName: 'fromLevelLabel',
				type: 'remoteSelect',
				code: 'POLICY_LEVEL',
				api: 'getDictItemList',
				filterKey: 'value',
				multiple: false,
				span: 6,
				rules: [{ required: true, message: '请选择来源层级' }],
			},

			{
				label: '养老业务标签',
				prop: 'policyTags',
				propName: 'policyTagsLabels',
				type: 'remoteSelect',
				code: 'POLICY_TAGS',
				api: 'getDictItemList',
				filterKey: 'label',
				multiple: true,
				span: 12,
			},
			{
				label: '老人类别',
				prop: 'oldmanType',
				propName: 'oldmanTypeLabel',
				type: 'remoteSelect',
				code: 'ELDERLY_TYPE',
				api: 'getDictItemList',
				filterKey: 'value',
				multiple: false,
				span: 12,
			},
			{
				label: '适应老人年龄',
				prop: 'ageRange',
				type: 'RangeValue',
				span: 12,
			},
			{
				label: '补贴类型',
				prop: 'subsidyType',
				propName: 'subsidyTypeLabel',
				type: 'remoteSelect',
				code: 'SUBSIDY_TYPE',
				api: 'getDictItemList',
				filterKey: 'value',
				multiple: false,
				span: 6,
			},

			{
				label: '政策内容',
				prop: 'policyContent',
				showWordLimit: true,
				type: 'ueditor',
				height: '20rem',
				rules: [{ required: true, message: '请输入政策内容' }],
				span: 24,
			},
			{
				label: '附件信息',
				prop: 'policyAttachment',
				type: 'upload',
				listType: 'text',
				showFileList: true,
				limit: 4,
				multiple: true,
				custome: 'file',
				span: 24,
			},
		],
	}
}
